<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<style>
    div[lay-id="datalist"] .layui-table-cell{
        height:auto !important;
    };
</style>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">基本信息</div>
            <table class="layui-table">
                <tbody>


                <tr><td class="tt">人员姓名</td><td id="name" class="tv"></td><td class="tt">员工编号</td><td id="number" class="tv"></td></tr>
                <tr><td class="tt">关联系统账号</td><td class="tv" id="userid" colspan="3"></td></tr>
                <tr><td class="tt">身份证号</td><td id="idcard" class="tv"></td><td class="tt">身份证有效期</td><td id="idcarddt" class="tv"></td></tr>
                <tr><td class="tt">性别</td><td id="sex" class="tv"></td><td class="tt">年龄</td><td id="age" class="tv"></td></tr>
                <tr><td class="tt">民族</td><td id="nation" class="tv"></td><td class="tt">政治面貌</td><td id="mian" class="tv"></td></tr>
                <tr><td class="tt">籍贯</td><td id="jiguan" class="tv"></td><td class="tt">常住地</td><td id="areas" class="tv"></td></tr>
                <tr><td class="tt">家庭住址</td><td id="addr" class="tv"></td><td class="tt">联系电话</td><td id="tel" class="tv"></td></tr>
                <tr><td class="tt">紧急联系人</td><td id="jiner" class="tv"></td><td class="tt">紧急联系人电话</td><td id="jintel" class="tv"></td></tr>
                <tr><td class="tt">学历</td><td id="xueli" class="tv"></td><td class="tt">毕业学校</td><td id="school" class="tv"></td></tr>
                <tr><td class="tt">专业</td><td id="major" class="tv"></td><td class="tt">毕业日期</td><td id="schooldt" class="tv"></td></tr>
                <tr><td class="tt">职称职级</td><td id="zhilevel" class="tv"></td><td class="tt">人员性质</td><td id="nature" class="tv"></td></tr>
                <tr><td class="tt">人员状态</td><td class="tv" id="state" colspan="3"></td></tr>
                <tr><td class="tt">入职日期</td><td id="intodt" class="tv"></td><td class="tt">转正日期</td><td id="zhuandt" class="tv"></td></tr>
                <tr><td class="tt">所在部门</td><td id="deptid" class="tv"></td><td class="tt">岗位</td><td id="gangid" class="tv"></td></tr>
                <tr id="leaveState" class="none"><td class="tt">离职日期</td><td id="outdt" class="tv"></td><td class="tt">离职说明</td><td id="outexp" class="tv"></td></tr>
                <tr><td class="tt">社保状态</td><td id="social" class="tv"></td><td class="tt">参保地</td><td id="socialareas" class="tv"></td></tr>
                <tr><td class="tt">参保开始月份</td><td id="socstartdt" class="tv"></td><td class="tt">参保结束月份</td><td id="socenddt" class="tv"></td></tr>
                <tr><td class="tt">参保说明</td><td class="tv" id="social_explain" colspan="3"></td></tr>
                <tr><td class="tt">社保卡号</td><td id="shenum" class="tv"></td><td class="tt">公积金号</td><td id="gongnum" class="tv"></td></tr>
                <tr><td class="tt">银行账户</td><td id="bankname" class="tv"></td><td class="tt">银行账号</td><td id="banknum" class="tv"></td></tr>
                <tr><td class="tt">开户行</td><td class="tv" id="bankkai" colspan="3"></td></tr>
                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo">证书信息</script>
            <div class="tableShow">
                <table id="datalist" lay-filter="datalist"></table>
            </div>
        </div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_use">使用记录</script>
            <div class="tableShow">
                <table id="datalist_use" lay-filter="datalist_use"></table>
            </div>
        </div>

        <div class="table-box tablenes">
            <script type="text/html" id="toolbarDemo_yeji">项目业绩记录</script>
            <div class="tableShow">
                <table id="datalist_yeji" lay-filter="datalist_yeji"></table>
            </div>
        </div>


        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_cert_person_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                $("#name").text(data.name);
                $("#number").text(data.number);
                $("#sex").text(data.sex);
                $("#age").text(data.age);
                $("#idcard").text(data.idcard);
                $("#idcarddt").text(data.idcarddt);
                $("#tel").text(data.tel);
                $("#areas").text(data.areas);
                $("#nature").text(data.nature);
                $("#chanid_name").text(data.chanid_name);
                $("#intodt").text(data.intodt);
                $("#outdt").text(data.outdt);
                $("#outexp").text(data.outexp);
                $("#state").text(data.state);
                if(data.state === '离职'){
                    $('#leaveState').show();
                }
                $("#social").text(data.social);
                $("#socialareas").text(data.socialareas);
                $("#socstartdt").text(data.socstartdt);
                $("#socenddt").text(data.socenddt);
                $("#social_explain").text(data.social_explain);
                $("#xueli").text(data.xueli);
                $("#major").text(data.major);
                $("#school").text(data.school);
                $("#schooldt").text(data.schooldt);
                $("#explain").text(data.explain);
                $("#mian").text(data.mian);
                $("#nation").text(data.nation);
                $("#jiguan").text(data.jiguan);
                $("#addr").text(data.addr);
                $("#jiner").text(data.jiner);
                $("#jintel").text(data.jintel);
                $("#zhilevel").text(data.zhilevel);
                $("#shenum").text(data.shenum);
                $("#gongnum").text(data.gongnum);
                $("#bankname").text(data.bankname);
                $("#banknum").text(data.banknum);
                $("#bankkai").text(data.bankkai);
                $("#deptid").text(data.deptid_name);
                $("#gangid").text(data.gangid_name);
                $("#userid").text(data.userid_name);
                $("#zhuandt").text(data.zhuandt);

                var mytableList = table.render({
                    elem: "#datalist",data:res.data.cert_list, toolbar: '#toolbarDemo', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'type', title: '证书类别'}
                        ,{field: 'name', title: '证书名称'}
                        ,{field: 'number', title: '证书编号'}
                        ,{field: 'major', title: '证书专业'}
                        ,{field: 'expiry_dt', title: '有效期至'}
                        ,{field: 'state_name', title: '证书状态'}
                        ,{field: 'statueuse_name', title: '使用情况'}
                        ,{field: 'form_name', title: '证书形式'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                        // 处理列表fixed的高度问题
                        $('div[lay-id="datalist"] .layui-table-main>table>tbody>tr').each(function (i) {
                            var height = $(this).height();
                            $('div[lay-id="datalist"] .layui-table-fixed-l>.layui-table-body>table>tbody>tr')
                                .eq(i).css('cssText','height:'+height+'px !important');
                            $('div[lay-id="datalist"] .layui-table-fixed-r>.layui-table-body>table>tbody>tr')
                                .eq(i).css('cssText','height:'+height+'px !important');
                        });
                    }
                });

                var mytableList22 = table.render({
                    elem: "#datalist_use",data:res.data.use_list, toolbar: '#toolbarDemo_use', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'engin_state', title: '项目状态'}
                        ,{field: 'enginid_name', title: '项目名称'}
                        ,{field: 'chanid_name', title: '项目所属单位'}
                        ,{field: 'business_name', title: '项目性质'}
                        ,{field: 'place', title: '岗位'}
                        ,{field: 'name', title: '证书名称'}
                        ,{field: 'major_name', title: '证书专业'}
                        ,{field: 'number', title: '证书编号'}
                        ,{field: 'issuo', title: '是否锁证'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });

                var mytableList33 = table.render({
                    elem: "#datalist_yeji",data:res.data.achieve_list, toolbar: '#toolbarDemo_yeji', page: false
                    ,limit:TabInitShow.limit,soulSort: TabInitShow.soulSort,method: TabInitShow.method, overflow: TabInitShow.overflow
                    ,defaultToolbar: TabInitShow.defaultToolbar,filter: TabInitShow.filter ,text: TabInitShow.text
                    ,request: TabInitShow.request,response: TabInitShow.response,contextmenu:get_table_contextmenu(soulTable)
                    , cols: [[
                        {type:'numbers',title:'序号',fixed:'left'}
                        ,{field: 'year', title: '年份'}
                        ,{field: 'name', title: '项目名称'}
                        ,{field: 'type', title: '项目类型'}
                        ,{field: 'money', title: '项目金额'}
                        ,{field: 'addr', title: '项目所在地'}
                        ,{field: 'start_dt', title: '开工时间'}
                        ,{field: 'end_dt', title: '竣工时间'}
                        ,{field: 'xiang_name', title: '项目经理'}
                        ,{field: 'ji_name', title: '技术负责人'}
                    ]]
                    , done: function (res) {
                        soulTable.render(this);
                    }
                });


                // $(".pageshowtitle").text('人员');
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('cert_person', param_id);
        showpage_dropopt();
    });



</script>
</body>
</html>




